package com.example.administrator.social.activitys;

import android.os.Handler;
import android.os.Message;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.example.administrator.social.R;
import com.example.administrator.social.util.HttpUtils;
import com.hyphenate.EMCallBack;
import com.hyphenate.chat.EMClient;

public class SettingsActivity extends AppCompatActivity implements View.OnClickListener {
    Button mLoginOutButton;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_settings);
        mLoginOutButton = (Button) findViewById(R.id.settings_button_login_out);
    }

    @Override
    public void onClick(View v) {
        int id = v.getId();
        switch (id){
            case R.id.settings_button_login_out:
               goOut();
        }
    }

    private void goOut() {
        EMClient.getInstance().logout(true, new EMCallBack() {
            @Override
            public void onSuccess() {
                // TODO Auto-generated method stub
            }

            @Override
            public void onProgress(int progress, String status) {
                // TODO Auto-generated method stub
            }

            @Override
            public void onError(int code, String message) {
                // TODO Auto-generated method stub
            }
        });
    }
}
